<script setup lang="ts">
import { useBasicStore } from '@/store/modules/basic'
import { computed } from 'vue'
import { useDesign } from '@/hooks/web/useDesign'

const { getPrefixCls } = useDesign()

const prefixCls = getPrefixCls('footer')

const basicStore = useBasicStore()

const footerItems = computed(() => basicStore.getFooter?.items)
</script>

<template>
  <div
    :class="prefixCls"
    class="text-center text-[var(--el-text-color-placeholder)] bg-[var(--app-content-bg-color)] h-[var(--app-footer-height)] leading-[var(--app-footer-height)] dark:bg-[var(--el-bg-color)]"
  >
    <template v-for="(item, it) in footerItems" :key="it">
      <a v-if="item.type === 'url'" :href="item.url" target="_blank" style="margin-left: 10px">{{
        item.content
      }}</a>
      <span v-else style="margin-left: 10px" :key="it">{{ item.content }}</span>
    </template>
  </div>
</template>
<style lang="less" scoped></style>
